# 编译日期：2019-06-25 15:55:00
# 版权所有：www.i-search.com.cn
# coding=utf-8

from win32com.client.gencache import EnsureDispatch
import sys
import os
import shutil

def del_file():
    xl = EnsureDispatch("Word.Application")
    file_path=os.path.abspath(os.path.dirname(os.path.dirname(sys.modules[xl.__module__].__file__)))
    listpath=os.listdir(file_path)
    for i in listpath:
        if '.' not in i:
            target_file=i
    try:
        shutil.rmtree(os.path.join(file_path,target_file))
    except:
        pass